#ifndef NEWACTIONDIALOG_H
#define NEWACTIONDIALOG_H

#include <QDialog>
#include "robotaction.h"

namespace Ui {
    class NewActionDialog;
}

class NewActionDialog : public QDialog
{
    Q_OBJECT

public:
    explicit NewActionDialog(Robot* robot, QWidget *parent = 0);
    ~NewActionDialog();

    //Executes the dialog and returns the new action created by
    //the input
    RobotAction* exec(bool createDefault);

private:
    Ui::NewActionDialog *ui;
    Robot* _robot;

    //Calculates the duration based on the spin boxes
    int getDuration();
    void setDuration(int msec);

private slots:
    //Opens up a file dialog to get the base file
    void getBaseFile();
};

#endif // NEWACTIONDIALOG_H
